<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="#2F3BA2">
    <meta name="apple-mobile-web-app-title" content="test PWA">
    <link rel="apple-touch-icon" href="./img/x.png">
    <meta name="description" content="A sample test app">
    <meta name="theme-color" content="#2F3BA2" />
    <link rel="manifest" href="./manifest.json">
    <title>test</title>
</head>
<body>
    hello PWA
    <script>
        if ('serviceWorker' in navigator) {
            window.addEventListener('load', () => {
                navigator.serviceWorker.register('./service-worker.js')
                    .then((reg) => {
                        console.log('Service worker registered.', reg);
                    });
            });
        }
    </script>
</body>
</html>